package com.ruoyi.find.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.find.mapper.SysSubwayLocationMapper;
import com.ruoyi.find.domain.SysSubwayLocation;
import com.ruoyi.find.service.ISysSubwayLocationService;

/**
 * 地铁周边地点Service业务层处理
 * 
 * @author LiuWeiChen
 * @date 2025-09-11
 */
@Service
public class SysSubwayLocationServiceImpl implements ISysSubwayLocationService 
{
    @Autowired
    private SysSubwayLocationMapper sysSubwayLocationMapper;

    /**
     * 查询地铁周边地点
     * 
     * @param locationId 地铁周边地点主键
     * @return 地铁周边地点
     */
    @Override
    public SysSubwayLocation selectSysSubwayLocationByLocationId(Long locationId)
    {
        return sysSubwayLocationMapper.selectSysSubwayLocationByLocationId(locationId);
    }

    /**
     * 查询地铁周边地点列表
     * 
     * @param sysSubwayLocation 地铁周边地点
     * @return 地铁周边地点
     */
    @Override
    public List<SysSubwayLocation> selectSysSubwayLocationList(SysSubwayLocation sysSubwayLocation)
    {
        return sysSubwayLocationMapper.selectSysSubwayLocationList(sysSubwayLocation);
    }

    /**
     * 新增地铁周边地点
     * 
     * @param sysSubwayLocation 地铁周边地点
     * @return 结果
     */
    @Override
    public int insertSysSubwayLocation(SysSubwayLocation sysSubwayLocation)
    {
        sysSubwayLocation.setCreateTime(DateUtils.getNowDate());
        return sysSubwayLocationMapper.insertSysSubwayLocation(sysSubwayLocation);
    }

    /**
     * 修改地铁周边地点
     * 
     * @param sysSubwayLocation 地铁周边地点
     * @return 结果
     */
    @Override
    public int updateSysSubwayLocation(SysSubwayLocation sysSubwayLocation)
    {
        sysSubwayLocation.setUpdateTime(DateUtils.getNowDate());
        return sysSubwayLocationMapper.updateSysSubwayLocation(sysSubwayLocation);
    }

    /**
     * 批量删除地铁周边地点
     * 
     * @param locationIds 需要删除的地铁周边地点主键
     * @return 结果
     */
    @Override
    public int deleteSysSubwayLocationByLocationIds(Long[] locationIds)
    {
        return sysSubwayLocationMapper.deleteSysSubwayLocationByLocationIds(locationIds);
    }

    /**
     * 删除地铁周边地点信息
     * 
     * @param locationId 地铁周边地点主键
     * @return 结果
     */
    @Override
    public int deleteSysSubwayLocationByLocationId(Long locationId)
    {
        return sysSubwayLocationMapper.deleteSysSubwayLocationByLocationId(locationId);
    }
}
